#!/bin/bash
#*******************************************
#Description:	Show system infomation
#Copyright (C):	2019 All rights reserverd
#*******************************************

RED="\E[1;31m"
GREEN="echo -e \E[1;32m"
END="\E[0m"
$GREEN-------------------------Host Systeminfo-----------------------------$END
echo -e "SYSTEM_VERSION:\t\t\t$RED`cat /etc/os-release | grep -E '^(NAME|VERSION_ID)'|cut -d"=" -f2 | tr -d '\"' | paste -s -d ' '`$END"
echo -e "HOSTNAME:\t\t\t$RED`hostname -s`$END"
echo -e "IPADDRESS:\t\t\t$RED`hostname -I |cut -d' ' -f1`$END"
echo -e "KERNEL:\t\t\t\t$RED`uname -r`$END"
echo -e "PRODUCTNAME:\t\t\t$RED`dmidecode | grep 'Product Name' | awk 'NR==1{print}' |cut -d ' ' -f3-`$END"
echo -e "CPUMODEL:\t\t\t$RED`cat /proc/cpuinfo |grep 'model name' |head -1|cut -d ' ' -f3-`$END"
echo -e "CPUCORE:\t\t\t$RED`lscpu |grep -E '^CPU(\(s\))?:'|tr -s ' '|cut -d ' ' -f2`$END"
echo -e "MEMORY:\t\t\t\t$RED`cat /proc/meminfo |awk 'NR==1 {printf ("%.0fG\n",$2/1024/1024)}'`$END"
echo -e "DISK:\t\t\t\t$RED`lsblk |grep -E '^\w'|grep -v 'sr0'|awk 'NR>=2{print $1": "$4}'|tr  '\n' '\t'`$END"
$GREEN-------------------------Host Systeminfo-----------------------------$END
